package ar.uba.dc.tl.mylanga.exception;

import ar.uba.dc.tl.mylanga.node.TIdentifier;

public class FunctionWithoutReturnException extends SemanticException {
    private TIdentifier identifier;

    public FunctionWithoutReturnException(TIdentifier identifier) {
        super(String.format("Function %s contains no return statement, at line %d column %d", identifier.getText(), identifier.getLine(), identifier.getPos()));
        this.identifier = identifier;
    }

    public TIdentifier getIdentifier() {
        return identifier;
    }
}
